home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / comm2 / samilog.lha / SAmiLog / Docs / Storage.DOC < prev   
Text File  |  1993-08-11  |  10KB  |  197 lines

  1. *****************************************************************************
  2. * Super-AmiLog Storage File Format (v002 - for SAmiLog v2.00)               *
  3. * There are some examples at the end of the file. They are in ASM, but are  *
  4. * VERY simple so they should be usefull to anyone really (except REXX haha) *
  5. * Sorry that it's all Rs-Tables, that's how I use it, change it to whatever *
  6. * form you want.                                                            *
  7. *****************************************************************************
  8. * I thought of putting some kind of checksum onto the data, but I guess it  *
  9. * would be easy enough for a lame-sysop to fake the calleslog to give him   *
  10. * some high-records. (Easier than hex-editing the storage file).            *
  11. *****************************************************************************
  12. * NOTE: All DATES are longwords containing the number of days since 1978,   *
  13. * ----- which you can convert into a string with DateToStr() in dos.library *
  14. *****************************************************************************
  15. *****************************************************************************
  16. *****************************************************************************
  17. * BELOW is the actual storage file structure.                               *
  18. *****************************************************************************
  19. ;===========================================================================;
  20. StorFil        Equ    __RS        ;------- Storage File Memory -------;
  21. ;===========================================================================;
  22. SV_Start    Rs.b    S_Vers_Len    File Version
  23. SX_Clear_Date    Rs.l    1        Date that the file was cleared/made.
  24. SX_RESERVED    Rs.b    36        36 CHARS RESERVED FOR ENHANCEMENTS
  25. ;---------------------------------------------------------------------------;
  26. ;- Daily Stats Structures [8] ----------------------------------------------;
  27. ;---------------------------------------------------------------------------;
  28. SD0_Base    Rs.b    SD_Len        Day #0 (Today)
  29. SD1_Base    Rs.b    SD_Len        Day #1 -.
  30. SD2_Base    Rs.b    SD_Len        Day #2    |
  31. SD3_Base    Rs.b    SD_Len        Day #3    |
  32. SD4_Base    Rs.b    SD_Len        Day #4    |- One Full Week.
  33. SD5_Base    Rs.b    SD_Len        Day #5    |
  34. SD6_Base    Rs.b    SD_Len        Day #6    |
  35. SD7_Base    Rs.b    SD_Len        Day #7 -'
  36. ;---------------------------------------------------------------------------;
  37. ;- Records Structure -------------------------------------------------------;
  38. ;---------------------------------------------------------------------------;
  39. SR_Calls    Rs.w    1        Callers
  40. SR_Calls_D    Rs.l    1        Date of Above
  41. SR_UpKBytes    Rs.l    1        KBytes Uploaded
  42. SR_UpKBytes_D    Rs.l    1        Date of Above
  43. SR_UpFiles    Rs.w    1        Files Uploaded
  44. SR_UpFiles_D    Rs.l    1        Date of Above
  45. SR_UpFails    Rs.w    1        Upload Fails  (Not Implemented)
  46. SR_UpFails_D    Rs.l    1        Date of Above (Not Implemented)
  47. SR_DnKBytes    Rs.l    1        KBytes Downloaded
  48. SR_DnKBytes_D    Rs.l    1        Date of Above
  49. SR_DnFiles    Rs.w    1        Files Downloaded
  50. SR_DnFiles_D    Rs.l    1        Date of Above
  51. SR_DnFails    Rs.w    1        Download Fails (Not Implemented)
  52. SR_DnFails_D    Rs.l    1        Date of Above  (Not Implemented)
  53. SR_UsedMins    Rs.l    1        Minutes Of Useage
  54. SR_UsedMins_D    Rs.l    1        Date of Above
  55. SR_NewUsers    Rs.w    1        New Users
  56. SR_NewUsers_D    Rs.l    1        Date of Above
  57. SR_Hacks    Rs.w    1        Hacks
  58. SR_Hacks_D    Rs.l    1        Date of Above
  59. SR_Drops    Rs.w    1        Drop Carriers
  60. SR_Drops_D    Rs.l    1        Date of Above
  61. SR_Pages    Rs.w    1        Pages
  62. SR_Pages_D    Rs.l    1        Date of Above
  63. SR_RESERVED    Rs.b    40        40 CHARS RESERVED FOR ENHANCEMENTS
  64. SR_Len        Equ    __RS-SR_Calls    Length
  65. ;---------------------------------------------------------------------------;
  66. ;- Individual User Entries [20] --------------------------------------------;
  67. ;---------------------------------------------------------------------------;
  68. SU01_Base    Rs.b    SU_Len        User #1
  69. SU02_Base    Rs.b    SU_Len        User #2
  70. SU03_Base    Rs.b    SU_Len        User #3
  71. SU04_Base    Rs.b    SU_Len        User #4
  72. SU05_Base    Rs.b    SU_Len        User #5
  73. SU06_Base    Rs.b    SU_Len        User #6
  74. SU07_Base    Rs.b    SU_Len        User #7
  75. SU08_Base    Rs.b    SU_Len        User #8
  76. SU09_Base    Rs.b    SU_Len        User #9
  77. SU10_Base    Rs.b    SU_Len        User #10
  78. SU11_Base    Rs.b    SU_Len        User #11
  79. SU12_Base    Rs.b    SU_Len        User #12
  80. SU13_Base    Rs.b    SU_Len        User #13
  81. SU14_Base    Rs.b    SU_Len        User #14
  82. SU15_Base    Rs.b    SU_Len        User #15
  83. SU16_Base    Rs.b    SU_Len        User #16
  84. SU17_Base    Rs.b    SU_Len        User #17
  85. SU18_Base    Rs.b    SU_Len        User #18
  86. SU19_Base    Rs.b    SU_Len        User #19
  87. SU20_Base    Rs.b    SU_Len        User #20
  88. ;---------------------------------------------------------------------------;
  89. S_Size        Equ    __RS-StorFil    Size of Storage File.
  90. *****************************************************************************
  91. *****************************************************************************
  92. *****************************************************************************
  93. * Below are equates etc used in the above structure                         *
  94. *****************************************************************************
  95. S_Vers        Dc.b    "*SALv002"        File Version (At Start)
  96. ;;;;;;;;;;;;;;;    This is *NOT* the version of SAmiLog it is for, but the
  97. ;;;;;;;;;;;;;;;    version of the Storage File itself. If, in a future update
  98. ;;;;;;;;;;;;;;;    (Say 2.10) I alter the format, it will be "*SALv003".
  99. S_Vers_Len    Equ    *-S_Vers
  100. ;---------------------------------------------------------------------------;
  101. ;- Daily Statistics in Storage File ----------------------------------------;
  102. ;---------------------------------------------------------------------------;
  103.         RSReset
  104. SD_Date        Rs.l    1        Date (Days Since 1978)
  105. SD_Calls    Rs.w    1        Callers
  106. SD_UpKBytes    Rs.l    1        KBytes Uploaded
  107. SD_UpFiles    Rs.w    1        Files Uploaded
  108. SD_UpFails    Rs.w    1        Upload Fails (Not implemented)
  109. SD_DnKBytes    Rs.l    1        KBytes Downloaded
  110. SD_DnFiles    Rs.w    1        Files Downloaded
  111. SD_DnFails    Rs.w    1        Download Fails (Not implemented)
  112. SD_UsedMins    Rs.l    1        Minutes Of Usage
  113. SD_NewUsers    Rs.w    1        New Users
  114. SD_Hacks    Rs.w    1        Hacks
  115. SD_Drops    Rs.w    1        Drop Carriers
  116. SD_Pages    Rs.w    1        Pages
  117. SD_RESERVED    Rs.b    40        40 CHARS RESERVED FOR ENHANCEMENTS
  118. SD_Len        Equ    __RS        Length
  119. ;---------------------------------------------------------------------------;
  120. ;- Individual Users in Storage File ----------------------------------------;
  121. ;---------------------------------------------------------------------------;
  122.         RSReset
  123. SU_Name        Rs.b    18        "[-----USER-----] ",0    User name
  124. SU_Location    Rs.b    21        "[----LOCATION!----] ",0 Location
  125. SU_Node        Rs.b    1        "0"            Node #
  126. SU_Usage    Rs.b    6        "-:-- ",0        Time online
  127. SU_UpKBytes    Rs.b    6        "   0 ",0        Upl KBytes
  128. SU_UpFiles    Rs.b    6        "   0 ",0        Upl Files
  129. SU_DnKBytes    Rs.b    6        "   0",10,0        Dnl KBytes
  130. SU_DnFiles    Rs.b    6        "   0",10,0        Dnl Files
  131. SU_OnTime    Rs.b    10        "--:--:-- ",0        Logon Time
  132. SU_OffTime    Rs.b    10        "--:--:-- ",0        Logoff Time
  133. SU_AvCPS    Rs.b    6        "   0 ",0        Avg CPS
  134. ;;;;;;;;;;;;;;;    (Average-CPS is NOT IMPLEMENTED)
  135. SU_Baud        Rs.b    5        "14400"            Baud Rate
  136. SU_Flag_1    Rs.b    1        0            Flag #1
  137. SU_Flag_2    Rs.b    1        0            Flag #2
  138. SU_Flag_3    Rs.b    1        0            Flag #3
  139. SU_Reserved    Rs.b    40        40 CHARS RESERVED FOR ENHANCEMENTS
  140. SU_Len        Equ    __RS        Length
  141. ;---------------------------------------------------------------------------;
  142. ;- Formats of Binary/Boleen Flag bytes in User Structures ------------------;
  143. ;---------------------------------------------------------------------------;
  144. ;- Flag #1 -----------------------------------------------------------------;
  145. ;---------------------------------------------------------------------------;
  146. SU_F1_New    Equ    0        New User?
  147. SU_F1_Hack    Equ    1        Hacking?
  148. SU_F1_Drop    Equ    2        Dropped Carrier?
  149. SU_F1_Page    Equ    3        Paged?
  150. SU_F1_SysC    Equ    4        Used Sysop Command(s)?
  151. SU_F1_Locl    Equ    5        Local Call?
  152. SU_F1_ISDN    Equ    6        ISDN Call?
  153. ;        Equ    7        RESERVED FOR ENHANCEMENTS
  154. ;---------------------------------------------------------------------------;
  155. ;- Flag #2 -----------------------------------------------------------------;
  156. ;---------------------------------------------------------------------------;
  157. SU_F2_Upld    Equ    0        Uploaded?
  158. SU_F2_UpFl    Equ    1        Failed an Upload?
  159. SU_F2_Dnld    Equ    2        Downloaded?
  160. SU_F2_DnFl    Equ    3        Failed a Download?
  161. ;        Equ    4        RESERVED FOR ENHANCEMENTS
  162. ;        Equ    5        RESERVED FOR ENHANCEMENTS
  163. ;        Equ    6        RESERVED FOR ENHANCEMENTS
  164. ;        Equ    7        RESERVED FOR ENHANCEMENTS
  165. ;---------------------------------------------------------------------------;
  166. ;- Flag #3 -----------------------------------------------------------------;
  167. ;---------------------------------------------------------------------------;
  168. ;        Equ    0        RESERVED FOR ENHANCEMENTS
  169. ;        Equ    1        RESERVED FOR ENHANCEMENTS
  170. ;        Equ    2        RESERVED FOR ENHANCEMENTS
  171. ;        Equ    3        RESERVED FOR ENHANCEMENTS
  172. ;        Equ    4        RESERVED FOR ENHANCEMENTS
  173. ;        Equ    5        RESERVED FOR ENHANCEMENTS
  174. ;        Equ    6        RESERVED FOR ENHANCEMENTS
  175. ;        Equ    7        RESERVED FOR ENHANCEMENTS
  176. ;---------------------------------------------------------------------------;
  177. *****************************************************************************
  178. *****************************************************************************
  179. *****************************************************************************
  180. * So for example, to Point a0 to the Location of the 19th user in the file  *
  181. * you load the storage file into memory and put its address into a4 and...  *
  182. *****************************************************************************
  183. ;    Lea    SU19_Base+SU_Location(a4),a0
  184. *****************************************************************************
  185. * To see if User 12 was a new caller:                                       *
  186. *****************************************************************************
  187. ;    BTst    #SU_F1_New,SU12_Base+SU_Flag_1(a4)
  188. ;    Bne.s    USER_IS_NEW
  189. *****************************************************************************
  190. * NOTE: Unlike the User-Info and the Daily-Info, the Records are accessed   *
  191. * ----- directly. EG to put the Date when there was the most calls into d0  *
  192. *****************************************************************************
  193. ;    Move.l    SR_Calls_D(a4),d0
  194. *****************************************************************************
  195. * NOTE: Do not write new data to the Storage file. That is SAmiLog's job!   *
  196. *****************************************************************************
  197.